<%@ Page Language="C#" AutoEventWireup="true" CodeFile="grurrah.aspx.cs" Inherits="Views_Grurrah_grurrah" MasterPageFile="~/Views/layouts/default_w_sidebar.master" %>
<%@ Register Assembly="Gaia.WebWidgets" Namespace="Gaia.WebWidgets" TagPrefix="gaia" %>
<%@ Register Assembly="Gaia.WebWidgets.Extensions" Namespace="Gaia.WebWidgets.Extensions" TagPrefix="gaia" %>
<%@ Register Assembly="Grr" Namespace="Grr.Web.WebControls" TagPrefix="grurrah" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditor" %>
<%@ Import Namespace="Grr.Models" %>


<asp:Content ID="Content1" ContentPlaceHolderID="TitleType" runat="server">Grurrah:</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TitleText" runat="server"><%= Name %></asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
<gaia:MultiView ID="ModeView" ActiveViewIndex="0" runat="server">
    <asp:View ID="ReadView" runat="server">
        <div>
            <div class="user_status">
                <gaia:MultiView ID="UserStatusView" ActiveViewIndex="0" runat="server">
                    <asp:View ID="NoneView" runat="server">
                        <gaia:LinkButton ID="NoneViewWantToDoItButton" Text="[I want to do this]" OnClick="NoneViewWantToDoItButton_Click" runat="server"></gaia:LinkButton>
                        <gaia:LinkButton ID="NoneViewDoingItButton" Text="[I am doing this]" OnClick="DoingItButton_Click" runat="server"></gaia:LinkButton>
                    </asp:View>
                    <asp:View ID="WantToDoItView" runat="server">
                        <gaia:LinkButton ID="WantToDoItViewDoingItButton" Text="[I am doing this now]" OnClick="DoingItButton_Click" runat="server"></gaia:LinkButton>
                        <gaia:LinkButton ID="WantToDoItViewDontWantButton" Text="[I don't want to do this anymore]" OnClick="NotDoingItButton_Click" runat="server"></gaia:LinkButton>
                    </asp:View>
                    <asp:View ID="DoingItView" runat="server">
                        <gaia:LinkButton ID="DoingItViewNotAnymoreButton" Text="[I am not doing this anymore]" OnClick="NotDoingItButton_Click" runat="server"></gaia:LinkButton>
                    </asp:View>
                </gaia:MultiView>
            </div>
            <div id="created_by">Created By:  <a href="<%= Page.ResolveUrl (People.UrlForPerson(CreatorName)) %>"><%= CreatorName %></a></div>
        </div>
        <%= Text %>
        <div class="view_controls">
            <gaia:LinkButton ID="SwitchToEditButton" CssClass="control-button" runat="server" style="float:right" OnClick="SwitchToEditButton_Click">[Edit this Grurrah]</gaia:LinkButton>
        </div>
    </asp:View>
    <asp:View ID="EditView" runat="server">
        <FCKeditor:FCKeditor ID="FCKeditor1" BasePath="/fckeditor/" UseBROnCarriageReturn="true" runat="server" />
        <div class="view_controls">
            <gaia:LinkButton ID="CancelEditButton" CssClass="control-button" runat="server" OnClick="CancelEditButton_Click">[Cancel]</gaia:LinkButton>
            |
            <asp:LinkButton ID="SaveEditButton" CssClass="control-button" runat="server" OnClick="SaveEditButton_Click">[Save Changes]</asp:LinkButton>
        </div>
    </asp:View>
</gaia:MultiView>
<div id="grurrah-controls-container">
    <div id="grurrah-controls-labels">
        <h3>Rating:</h3>
        <h3>Tags:</h3>
    </div>
    <div id="grurrah-controls">

        <%-- Ratings --%>
        <div id="ratings-control">
            <div id="rating_avg_container"><gaia:HiddenField ID="RatingAverageHiddenField" runat="server" /></div>
            <div id="rating_locked_container"><gaia:HiddenField ID="RatingLockedHiddenField" Value="false" runat="server" /></div>
            <gaia:ImageButton ID="RatingStar1" runat="server" ImageUrl="~/Content/images/rating-control/star-empty.gif" AlternateText="Rate this a one" CssClass="ratings-control-star" onmouseout="ratings_clear ();" onmouseover="ratings_set (1);" OnClick="RatingStar1_Click" /><gaia:ImageButton ID="RatingStar2" runat="server" ImageUrl="~/Content/images/rating-control/star-empty.gif" AlternateText="Rate this a two" CssClass="ratings-control-star" onmouseout="ratings_clear ();" onmouseover="ratings_set (2);" OnClick="RatingStar2_Click" /><gaia:ImageButton ID="RatingStar3" runat="server" AlternateText="Rate this a three" ImageUrl="~/Content/images/rating-control/star-empty.gif" CssClass="ratings-control-star" onmouseout="ratings_clear ();" onmouseover="ratings_set (3);" OnClick="RatingStar3_Click" /><gaia:ImageButton ID="RatingStar4" runat="server" AlternateText="Rate this a four" ImageUrl="~/Content/images/rating-control/star-empty.gif" CssClass="ratings-control-star" onmouseout="ratings_clear ();" onmouseover="ratings_set (4);" OnClick="RatingStar4_Click" /><gaia:ImageButton ID="RatingStar5" runat="server" AlternateText="Rate this a five" ImageUrl="~/Content/images/rating-control/star-empty.gif" CssClass="ratings-control-star" onmouseout="ratings_clear ();" onmouseover="ratings_set (5);" OnClick="RatingStar5_Click" />
            <gaia:ImageButton ID="ClearRatingButton" runat="server" AlternateText="Clear your rating" ImageUrl="~/Content/images/rating-control/clear.gif" OnClick="ClearRatingButton_Click" Visible="false" />
        </div>

        <%-- Tags --%>
        <gaia:MultiView ID="TagsView" ActiveViewIndex="0" runat="server">
            <asp:View ID="ReadTagsView" runat="server">
                <% 
                    for (int i = 0; i < Tags.Length; i++) {
                        string tag = Tags[i];
                %>
                    <a href="<%= ResolveUrl (Tag.UrlForTag (tag)) %>" rel="tag"><%= tag %></a><%= i < Tags.Length - 1 ? "," : String.Empty %>
                <% } %>
                <gaia:LinkButton ID="EditTagsButton" Text="[Edit Tags]" runat="server" OnClick="EditTagsButton_Click" />
            </asp:View>
            <asp:View ID="EditTagsView" runat="server">
                <gaia:TextBox ID="EditTagsTextBox" runat="server" />
                <gaia:LinkButton ID="EditTagsDoneButton" Text="[Done]" runat="server" OnClick="EditTagsDoneButton_Click" />
            </asp:View>
        </gaia:MultiView>
    </div>
    <div style="clear:both;"></div>
</div>

    <gaia:Window id="user_notification_window"
        CssClass="gaiax"
        Width="300px"
        Closable="true" 
        Draggable="false" 
        Maximizable="false" 
        Minimizable="false" 
        Modal="true" 
        Resizable="false" 
        Visible="false"
        runat="server">

        <div style="text-align: center; padding: 10px;">
            <gaia:Label ID="UserNotificationLabel" runat="server" />
            <p />
            <gaia:LinkButton ID="UserNoticationCloseButton" Text="[Close]" runat="server" OnClick="UserNoticationCloseButton_Click" />
        </div>

    </gaia:window>
    
</asp:Content>

